package org.jdsm.flow.contact.impl.objectify;

import com.google.appengine.api.datastore.Text;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import org.jdsm.flow.contact.IContactEntity;

/**
 * User: mikom
 * Date: 2/6/13
 * Time: 4:43 PM
 */
@Entity(name = "Contact")
public class ContactEntity implements IContactEntity<Long> {
    @Id
    private Long id;
    private String value;
    private Text img;
    private String link;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public String getImg() {
        return img.getValue();
    }

    @Override
    public void setImg(String img) {
        this.img = new Text(img);
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("ContactEntity");
        sb.append("{id=").append(id);
        sb.append(", value='").append(value).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
